package cn.stacey.day11;

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;

import org.junit.Test;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.chart.Axis;
import javafx.scene.chart.CategoryAxis;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart.Data;
import javafx.scene.chart.XYChart.Series;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;

public class DemoLineChartPratice extends Application{

	@Override
	public void start(Stage primaryStage) throws Exception {
		// TODO Auto-generated method stub
		VBox box=new VBox();

	

		Map<String,Map<String,Number>> allScores=new HashMap<>();
		Map<String,Number> scores=new HashMap<>();
		scores.put("qq", 89.0);
		scores.put("www", 88);
		scores.put("ee", 99);
		scores.put("rr", 77.8);
		allScores.put("语文成绩", scores);
		

//		System.out.println(allScores);
		
		
		scores=new HashMap<>();
		
		scores.put("aaa", 88.0);
		scores.put("ss", 80);
		scores.put("dd", 101);
		scores.put("ff", 79.8);
		scores.put("hh", 78);
		allScores.put("数学成绩", scores);
		
//		box.getChildren().add(ChartUtils1.createLineChart("语文成绩",scores));
		box.getChildren().addAll(ChartUtils1.createLineChart1(allScores));
		System.out.println(allScores);

	
		Scene scene=new Scene(box);
		primaryStage.setScene(scene);
		primaryStage.show();
		
	}
	
	public static void main(String[] args) {
		launch(args);
	}

	

}
